<h1>Listado de Instituciones Culturales</h1>
<% if flash[:notice] %>
    <div id="notice"><%= flash[:notice] %></div>
<% end %>
<% if @cultural_heritage_cultural_institutions.size > 0 %>
<fieldset id="agrupacion">
<legend>Busqueda:</legend>
<% form_tag url_for(:action=>"update_table"),{:id =>"cultural_heritage_cultural_institutions_form_search"} do -%>
<p class="two-col"><label>Campo:</label><%= text_field_tag "search_name" %></p>
<p class="two-col"><label>Criterio de Búsqueda: </label><%=  select_tag "field_name",  options_for_select([["Todos","Todos"],["Nombre","Nombre"], ["Web","Web"], ["Correo","Correo"]]) %></p>

<p class="two-col"><label>Departamento:</label><%= select_tag "search_department", options_for_select(@departments.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione" %>
</p>
<div id="provinces_search">
    <%= render :partial =>'provinces_search'%>
</div>
<input class="button" name="Buscar" value="Buscar" id="cultures_search" type="submit" /><span id="loading_search" style="display:none"></span>
<% end %>
</fieldset>
<br></br>
<fieldset id="agrupacion" >
<legend>Resultado </legend>
<div id="cultural_heritage_cultural_institutions_table">
   <%= render :partial=>"table" %>
</div>
</fieldset>
<% else %>
  <p>Ninguna Institucion Cultural Encontrada</p>
<% end %>
<br />
<% if (user_signed_in? && ([2,4].include?(current_user.role))) %>
<p><%= link_to 'Nueva Institucion Cultural', new_cultural_heritage_cultural_institution_path %></p>
<%end%>
<fieldset class="column-right4">
  <%= link_to 'Búsqueda en Mapa de Instituciones culturales',{:controller => 'cultural_heritage/cultural_institutions', :action => 'gmaps_search'}%>
</fieldset>